<template>
  <div>
    <el-table :data="tableData.records"
              style="width: 50%"
              border>
      <el-table-column prop="id"
                       label="序号"
                       width="50">
      </el-table-column>
      <el-table-column prop="name"
                       label="名称"
                       width="180">
      </el-table-column>
      <el-table-column prop="value"
                       label="值"
                       width="200">
      </el-table-column>
      <el-table-column prop="type"
                       label="类型"
                       width="120">
      </el-table-column>
    </el-table>
  </div>
</template>

<script>
import { queryList } from '@/api/rule'
export default {
  data () {
    return {
      tableData: [],
      queryRule: {
        type: "COUPON",
        page: 1,
        size: 5
      }
    }
  },
  created () {
    this.list();
  },
  methods: {
    list () {
      queryList(this.queryRule).then((res) => {
        console.log(res);
        this.tableData = res.data
      })
    }
  }

}
</script>


<style lang="sass" scoped>
</style>